<?php

namespace app\home\controller;

use think\Controller;
use think\Request;

class Base extends Controller
{
   public function __construct(Request $request){
        parent::__construct($request);
        $data = \app\common\model\Category::select();
        $data = (new \think\Collection($data))->toArray();
        $category = get_tree_list($data);
       $this->assign('category', $category);
   }
}
